package com.zit.java.service.sysuser;

import com.zit.java.pojo.SysUser;
import com.zit.java.util.object.TableData;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

public interface UserSerivce {


    SysUser queryUser(int id);

    int updataData(SysUser name);

    int delUser(int id);

    /**
     * 修改用户信息
     * @param id
     * @return
     */
    int updateUser(int id,SysUser sysUser);


    TableData<SysUser> queryUserByCondition(String name, String loginName, int page, int limit);
/*
            根据用户id查询角色信息
 */
    List<Map<String,Object>> queryAllRoles(String id);

    int updateUserRole(String[] roleIds, String id, HttpServletRequest request);

    /**
     * 删除用户
     * @param sysUser
     * @return
     */
    int deleteUser(SysUser sysUser);

    /**
     * 添加用户
     * @param sysUser
     * @return
     */
    int saveUser(SysUser sysUser);

    /**
     * 批量删除用户
     * @param ids
     * @return
     */
    int batchDelUser(List<String> ids);

    int updateUserDate(SysUser sysUser);

    TableData<SysUser> queryUserByName(String name);
}
